<template>
	<view class="conten">
		<view style="width: 90%;margin: auto;height: 86vh;overflow-y: auto;">
			<rich-text :nodes="configinfo_text" style="color: #fff;line-height: 1.5;"></rich-text>
		</view>
		<view style="width: 85%;height: 100rpx;background-color: #fff;color: #0D4283;margin: 60rpx auto;border-radius: 100rpx;text-align: center;line-height: 100rpx;font-size: 50rpx;" @click="agreeWith">同意并勾选</view>
	</view>
</template>

<script>
	import forum from '@/api/forum.js';
	export default {
		data() {
			return {
				configinfo_text: '',
				configinfo:'',
				album_labels:1,
				TabCur:0,
				phone:'',
				code:'',
				username:'',
				password:'',
			}
		},
		onLoad(options) {
			forum.getWebConfig({}).then(res => {
			    this.configinfo = res.data.web_service_agreement
			    this.configinfo_text = res.data.web_service_agreement_text
			})			
			this.albumLabels = options.album_labels;
			this.tabCur = options.TabCur;
			this.phone = options.phone;
			this.code = options.code;
			this.username = options.username;
			this.password = options.password;
		},
		methods: {
			agreeWith(){
				uni.setStorageSync('is_agreement',1);			
				uni.setStorageSync('albumLabels',this.albumLabels);
				uni.setStorageSync('tabCur',this.tabCur);			
				uni.setStorageSync('phone',this.phone);
				uni.setStorageSync('code',this.code);
				uni.setStorageSync('username',this.username);
				uni.setStorageSync('password',this.password);				
				uni.navigateTo({
					url: '/pages/login/login'
				})
			}
		}
	}
</script>

<style>
	.conten{
		width: 100%;
		height: 100vh;
		background: linear-gradient(to bottom, #1C386E, #4683CF);
	}
</style>
